import { Component } from '@angular/core';
import { NavController, NavParams } from 'ionic-angular';
import {HttpServies} from '../../providers/http-servies';



@Component({
  selector: 'page-work',
  templateUrl: 'work.html',
  providers:[HttpServies]
})
export class WorkPage {

    userInfo={
        'companyname':'',
        'jobinten':'',

    }

    dataJson:any=[];
    // public arrayOfKeys:any;
    companyname:string;
    jobinten:string;



  constructor(public navCtrl: NavController,public navParams: NavParams, private http:HttpServies) {
      this.jobinten =navParams.get('jobinten');
      this.companyname = navParams.get('companyname');


  }
  ionViewDidLoad() {
   this.works();
  }
  works(){
      var param = 'jobinten='+this.jobinten +'&companyname='+this.companyname;
      this.http.httpPost('/Home/job/details',param)
          .then(res => {//成功
            if (res && res.code == 1) {
              console.log(res.msg);
              this.dataJson = res.data;
                // this.arrayOfKeys = Object.keys(this.dataJson);
            }else {
              this.http.showErro(res.msg);
            }
          })
    }

}
